package main

import "fmt"

func main() {
	fmt.Println("a")
	hanio(3, "A", "B", "C")
}

func hanio(n int, a, b, c string) {
	if n == 0 {
		return
	}

	if n == 1 {
		fmt.Printf("%s->%s -> %d \n", a, c, n)
	} else {
		hanio(n-1, a, c, b)
		fmt.Printf("%s->%s -> %d \n", a, c, n)

		hanio(n-1, b, a, c)
	}
}
